.class public Llt/farmis/libraries/notificationcontroller/receivers/NotificationBroadcastReceiver;
.super Landroidx/legacy/content/WakefulBroadcastReceiver;
.source "NotificationBroadcastReceiver.java"


# static fields
.field public static final TAG:Ljava/lang/String; = "NotificationBroadcastReceiver"


# instance fields
.field protected mActionHandler:Landroid/os/Handler;

.field protected mHandlerThreadName:Ljava/lang/String;

.field protected mIntentFilter:Landroid/content/IntentFilter;

.field protected mNotificationController:Llt/farmis/libraries/notificationcontroller/NotificationController;


# direct methods
.method public constructor <init>()V
    .locals 2

    .line 69
    invoke-direct {p0}, Landroidx/legacy/content/WakefulBroadcastReceiver;-><init>()V

    const-string v0, "notificationHandlerThread"

    .line 58
    iput-object v0, p0, Llt/farmis/libraries/notificationcontroller/receivers/NotificationBroadcastReceiver;->mHandlerThreadName:Ljava/lang/String;

    .line 71
    new-instance v0, Landroid/content/IntentFilter;

    invoke-direct {v0}, Landroid/content/IntentFilter;-><init>()V

    iput-object v0, p0, Llt/farmis/libraries/notificationcontroller/receivers/NotificationBroadcastReceiver;->mIntentFilter:Landroid/content/IntentFilter;

    .line 72
    iget-object v0, p0, Llt/farmis/libraries/notificationcontroller/receivers/NotificationBroadcastReceiver;->mIntentFilter:Landroid/content/IntentFilter;

    const-string v1, "lt.farmis.libraries.notificationcontroller.notification.OPEN"

    invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    .line 73
    iget-object v0, p0, Llt/farmis/libraries/notificationcontroller/receivers/NotificationBroadcastReceiver;->mIntentFilter:Landroid/content/IntentFilter;

    const-string v1, "lt.farmis.libraries.notificationcontroller.notification.DELETE"

    invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    .line 74
    iget-object v0, p0, Llt/farmis/libraries/notificationcontroller/receivers/NotificationBroadcastReceiver;->mIntentFilter:Landroid/content/IntentFilter;

    const-string v1, "lt.farmis.libraries.notificationcontroller.notification.SUMMARY_OPEN"

    invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    .line 79
    new-instance v0, Landroid/os/HandlerThread;

    iget-object v1, p0, Llt/farmis/libraries/notificationcontroller/receivers/NotificationBroadcastReceiver;->mHandlerThreadName:Ljava/lang/String;

    invoke-direct {v0, v1}, Landroid/os/HandlerThread;-><init>(Ljava/lang/String;)V

    .line 80
    invoke-virtual {v0}, Landroid/os/HandlerThread;->start()V

    .line 81
    invoke-virtual {v0}, Landroid/os/HandlerThread;->getLooper()Landroid/os/Looper;

    move-result-object v0

    .line 84
    new-instance v1, Landroid/os/Handler;

    invoke-direct {v1, v0}, Landroid/os/Handler;-><init>(Landroid/os/Looper;)V

    iput-object v1, p0, Llt/farmis/libraries/notificationcontroller/receivers/NotificationBroadcastReceiver;->mActionHandler:Landroid/os/Handler;

    return-void
.end method


# virtual methods
.method protected getController(Landroid/content/Context;)Llt/farmis/libraries/notificationcontroller/NotificationController;
    .locals 0

    const p0, 0x0

    throw p0
.end method

.method public onReceive(Landroid/content/Context;Landroid/content/Intent;)V
    .locals 3

    .line 89
    sget-object v0, Llt/farmis/libraries/notificationcontroller/receivers/NotificationBroadcastReceiver;->TAG:Ljava/lang/String;

    const-string v1, "Received a broadcast. Handling notification changes..."

    invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 92
    invoke-virtual {p2}, Landroid/content/Intent;->getAction()Ljava/lang/String;

    move-result-object v0

    const-string v1, "lt.farmis.libraries.notificationcontroller.notification.OPEN"

    .line 97
    invoke-virtual {v0, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_0

    .line 98
    iget-object v1, p0, Llt/farmis/libraries/notificationcontroller/receivers/NotificationBroadcastReceiver;->mActionHandler:Landroid/os/Handler;

    new-instance v2, Llt/farmis/libraries/notificationcontroller/receivers/NotificationBroadcastReceiver$1;

    invoke-direct {v2, p0, p1, p2}, Llt/farmis/libraries/notificationcontroller/receivers/NotificationBroadcastReceiver$1;-><init>(Llt/farmis/libraries/notificationcontroller/receivers/NotificationBroadcastReceiver;Landroid/content/Context;Landroid/content/Intent;)V

    invoke-virtual {v1, v2}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    :cond_0
    const-string v1, "lt.farmis.libraries.notificationcontroller.notification.DELETE"

    .line 109
    invoke-virtual {v0, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_1

    .line 110
    iget-object v1, p0, Llt/farmis/libraries/notificationcontroller/receivers/NotificationBroadcastReceiver;->mActionHandler:Landroid/os/Handler;

    new-instance v2, Llt/farmis/libraries/notificationcontroller/receivers/NotificationBroadcastReceiver$2;

    invoke-direct {v2, p0, p1, p2}, Llt/farmis/libraries/notificationcontroller/receivers/NotificationBroadcastReceiver$2;-><init>(Llt/farmis/libraries/notificationcontroller/receivers/NotificationBroadcastReceiver;Landroid/content/Context;Landroid/content/Intent;)V

    invoke-virtual {v1, v2}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    :cond_1
    const-string v1, "lt.farmis.libraries.notificationcontroller.notification.SUMMARY_OPEN"

    .line 121
    invoke-virtual {v0, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_2

    .line 122
    iget-object v0, p0, Llt/farmis/libraries/notificationcontroller/receivers/NotificationBroadcastReceiver;->mActionHandler:Landroid/os/Handler;

    new-instance v1, Llt/farmis/libraries/notificationcontroller/receivers/NotificationBroadcastReceiver$3;

    invoke-direct {v1, p0, p1, p2}, Llt/farmis/libraries/notificationcontroller/receivers/NotificationBroadcastReceiver$3;-><init>(Llt/farmis/libraries/notificationcontroller/receivers/NotificationBroadcastReceiver;Landroid/content/Context;Landroid/content/Intent;)V

    invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    :cond_2
    return-void
.end method
